import { Injectable } from '@nestjs/common';
import { AuthenticationStrategy } from './authentication-strategy.interface';
import { AuthService } from './auth.service';
import { UserService } from 'src/modules/user/user.service';
import { MobileLoginDto } from './dto/mobile-login.dto';

// phone-verification.strategy.ts
@Injectable()
export class PhoneVerificationStrategy implements AuthenticationStrategy {
  constructor(
    private readonly userService: UserService,
  ) { }

  async register(credentials: MobileLoginDto): Promise<any> {
    this.userService.create(credentials);
  }

  async authenticate(credentials: any): Promise<any> {
    // 执行手机号验证码登录逻辑
    // 例如，验证验证码是否正确，并返回用户信息
  }
}
